<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ page import="javax.jdo.PersistenceManager"%>
<%@ page import="com.google.appengine.api.users.User"%>
<%@ page import="com.google.appengine.api.users.UserService"%>
<%@ page import="com.google.appengine.api.users.UserServiceFactory"%>
<%@ page import="com.fesp.EntityAthlete"%>
<%@ page import="com.fesp.PMF"%>
<%@ page import="com.google.appengine.api.datastore.DatastoreService"%>
<%@ page import="com.google.appengine.api.datastore.DatastoreServiceFactory"%>
<%@ page import="com.google.appengine.api.datastore.Entity"%>
<%@ page import="com.google.appengine.api.datastore.PreparedQuery"%>
<%@ page import="com.google.appengine.api.datastore.Query"%>

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>FESP Verification</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>
	<%
		UserService userService = UserServiceFactory.getUserService();
		User user = userService.getCurrentUser();
	%>

	<div id="masthead">
		<ul id="top_menu">
			<%
				if (user != null) {
			%>
			<li><a href="<%=userService.createLogoutURL("/index.jsp")%>">Log
					Off</a></li>
			<%
				} else {
			%>
			<li><a
				href="<%=userService.createLoginURL(request.getRequestURI())%>">Log
					In</a></li>
			<%
				}
			%>
			<%
				if (user != null) {
			%>
			<li><a href="/student/statistics.jsp">Statistics</a></li>
			<%
				}
			%>
			<li><a href="/student/calendar.jsp">Calendar</a></li>
			<li><a href="/student/planner.jsp">Planner</a></li>
			<li><a href="/index.jsp">Home</a></li>
		</ul>
		<div id="filler"></div>

		<%
			if (user != null) {
		%>
		<div id="user_container">
			<div id="user_info">
				<li>&nbsp;</li>
				<li>Welcome, <font color="#99b910">user</font>! <br>Modify
					your <a href="/student/settings.jsp">settings!</a><br>Last
					logged in: 00:00</li>
				<li>&nbsp;</li>
			</div>
		</div>
		<%
			}
		%>
	</div>

	<div id="page_content">

		<table>
			<tr>
				<td class="col1">

					<div class="roundcont">
						<div class="roundtop">
							<img src="/images/topl.gif" alt="" width="15" height="15"
								class="corner" style="display: none" />
						</div>
						
						<br/>
						<center><h2>Summary</h2></center></br>
						
						<p>Below is the information you provided. Please verify all is accurate.</p></br>

						<table align="center">

						<%@ page import="javax.servlet.*" %>
						<%@ page import="java.util.Vector" %>
						<%
							/* Name (0), division (1), grade (2), final exam percent (3), current overall percent (4), goal percent (5),
							 * project hours (6), research hours (7), reading hours (8), other hours (9), confidence (10), finals day (11).
							 */
							Vector<Vector<String>> classes = (Vector<Vector<String>>)session.getAttribute("classes");
							for (int i=0; i<classes.size(); i++) {
								Vector<String> my_class = classes.get(i);
						%>
							<tr>
								<td colspan="2"><center><b><%= my_class.get(0) %></b></center></td>
							</tr>
							<tr>
								<td width="200">Division</td>
								<td><%= my_class.get(1) %></td>
							</tr>
							<tr>
								<td width="200">Grade</td>
								<td><%= my_class.get(2) %></td>
							</tr>
							<tr>
								<td width="200">Final Exam Percent</td>
								<td><%= my_class.get(3) %></td>
							</tr>
							<tr>
								<td width="200">Current Overall Percent</td>
								<td><%= my_class.get(4) %></td>
							</tr>
							<tr>
								<td width="200">Goal Percent</td>
								<td><%= my_class.get(5) %></td>
							</tr>
							<tr>
								<td width="200">Project Hours</td>
								<td><%= my_class.get(6) %></td>
							</tr>
							<tr>
								<td width="200">Research Hours</td>
								<td><%= my_class.get(7) %></td>
							</tr>
							<tr>
								<td width="200">Reading Hours</td>
								<td><%= my_class.get(8) %></td>
							</tr>
														<tr>
								<td width="200">Other Hours</td>
								<td><%= my_class.get(9) %></td>
							</tr>
														<tr>
								<td width="200">Confidence</td>
								<td><%= my_class.get(10) %></td>
							</tr>
														<tr>
								<td width="200">Finals Day</td>
								<td><%= my_class.get(11) %></td>
							</tr>
							<tr>
								<td>&nbsp;</td>
								<td>&nbsp;</td>
							</tr>
							
						<%
							}
						%>
						
						</table>
						
						<center><form action="/calculate" method="get">
							<input type="submit" value="Submit" />
						</form></center>

						<div class="roundbottom">
							<img src="/images/bottoml.gif" alt="" width="15" height="15"
								class="corner" style="display: none" />
						</div>
					</div></td>
			</tr>
		</table>
		
	<div id="footer">
		<p>Copyright © 2011 Eric Y. Chung. All rights reserved.</p>
	</div>
</body>
</html>